<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateTaggedsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('taggeds', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('tag_id')->comment('标签');
            $table->string('module_type')->comment('模型');
            $table->integer('module_id')->comment('模型id');
            $table->boolean('is_robot')->comment('是否自动标签')->default(false)->nullable();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('taggeds');
    }
}
